package com.baofu.paycore.manager.storage.impl;

import com.baofu.paycore.dal.mapper.ErrorLogMapper;
import com.baofu.paycore.dal.model.ErrorLogDO;
import com.baofu.paycore.manager.storage.Storage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 差错日志记录
 *
 * <p>
 *  1.新增订单
 *  2.更新订单
 *  3.废弃订单
 * </p>
 * User: xin deng  Date: 16/7/9 ProjectName: paycore Version: 1.0
 */
@Slf4j
@Service
public class ErrorLogManager implements Storage<ErrorLogDO> {

    /**
     * 差错日志Mapper
     */
    @Autowired
    private ErrorLogMapper errorLogMapper;

    /**
     * 新增订单
     *
     * @param errorLogDO 订单信息
     */
    @Override
    public int addOrder(ErrorLogDO errorLogDO) {

        return errorLogMapper.insert(errorLogDO);
    }

    /**
     * 更新订单
     *
     * @param errorLogDO 订单信息
     */
    @Override
    public int modifyOrder(ErrorLogDO errorLogDO) {
        return 0;
    }

    /**
     * 废弃订单
     *
     * @param errorLogDO 订单信息
     */
    @Override
    public int deleteOrder(ErrorLogDO errorLogDO) {
        return 0;
    }
}
